package com.yx.coredata.common.result;

/**
 * Created by lichagnfeng on 2017/2/27.
 */

import java.io.Serializable;

public class JsonResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    public JsonResult(){
        this.status = true;
        this.message = "";
    }

    public JsonResult(T obj){
        this.status = true;
        this.message = "";
        this.object = obj;
    }

    public JsonResult(boolean status, String message){
        this.status = status;
        this.message = message;
    }

    public JsonResult(Long dataId, boolean status, String message){
        this.status = status;
        this.message = message;
        this.dataId = dataId;
    }

    public JsonResult(boolean status, String message, T obj){
        this.status = status;
        this.message = message;
        this.object = obj;
    }

    private boolean status;
    private String message;
    private T object;
    private Long dataId;

    public boolean isStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }

    public T getObject() {
        return object;
    }

    public Long getDataId() {return dataId; }
}

